﻿@typeparam TValue
@inherits Blazorise.NumericPicker<TValue>
<span class="fui-SpinButton">
    @InputElement
    @if ( IsShowStepButtons )
    {
        <button tabindex="-1" aria-label="Increment value" type="button" class="fui-SpinButton__incrementButton" @onclick="@OnSpinUpClicked">
            <svg fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
                <path d="M3.15 10.35c.2.2.5.2.7 0L8 6.21l4.15 4.14a.5.5 0 0 0 .7-.7l-4.5-4.5a.5.5 0 0 0-.7 0l-4.5 4.5a.5.5 0 0 0 0 .7Z" fill="currentColor"></path>
            </svg>
        </button>
        <button tabindex="-1" aria-label="Decrement value" type="button" class="fui-SpinButton__decrementButton" @onclick="@OnSpinDownClicked">
            <svg fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
                <path d="M3.15 5.65c.2-.2.5-.2.7 0L8 9.79l4.15-4.14a.5.5 0 0 1 .7.7l-4.5 4.5a.5.5 0 0 1-.7 0l-4.5-4.5a.5.5 0 0 1 0-.7Z" fill="currentColor"></path>
            </svg>
        </button>
    }
</span>
@ChildContent
@Feedback
@code
{
    protected RenderFragment InputElement => __builder =>
    {
        <input @ref="@ElementRef" id="@ElementId" name="@NameAttributeValue" inputmode="@InputMode" class="@ClassNames" style="@StyleNames" placeholder="@Placeholder" disabled="@Disabled" readonly="@ReadOnly" size="@VisibleCharacters" step="@StepString" pattern="@Pattern" tabindex="@TabIndex" aria-valuemin="@Min" aria-valuemax="@Max" aria-valuenow="@CurrentValueAsString" @onkeydown="@OnKeyDownHandler" @onkeypress="@OnKeyPressHandler" @onkeyup="@OnKeyUpHandler" @onblur="@OnBlurHandler" @onfocus="@OnFocusHandler" @onfocusin="@OnFocusInHandler" @onfocusout="@OnFocusOutHandler" @attributes="@Attributes" />
    };
}